//
//  ServiceTableViewCell.m
//  LoanMoney
//
//  Created by gynjobs on 2017/8/29.
//  Copyright © 2017年 cangming. All rights reserved.
//

#import "ServiceTableViewCell.h"

@interface ServiceTableViewCell ()
@property (weak, nonatomic) IBOutlet UIView *serviceContentView;
@property (weak, nonatomic) IBOutlet UIImageView *leftImageView;
@property (weak, nonatomic) IBOutlet UILabel *desLable;
@property (weak, nonatomic) IBOutlet UILabel *dateLable;
@property (weak, nonatomic) IBOutlet UILabel *titleLable;

@end


@implementation ServiceTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self = [[[NSBundle mainBundle]loadNibNamed:NSStringFromClass([self class]) owner:self options:nil]firstObject];
    }
    return self;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    self.serviceContentView.layer.borderColor = [UIColor colorWithString:@"#DFDFDF"].CGColor;
    self.serviceContentView.layer.borderWidth = 1;
    self.serviceContentView.layer.cornerRadius = 5;
    self.serviceContentView.layer.masksToBounds = YES;
    
    // Initialization code
}
-(void)setModle:(CellModle *)Modle{
    if (_Modle!=Modle) {
        _Modle = Modle;
        self.titleLable.text = Modle.title;
        self.desLable.text = Modle.desc;
        if ([Modle.ad_img isUrlString]) {
            [self.leftImageView sd_setImageWithURL:[NSURL URLWithString:Modle.ad_img]];
        }
        self.dateLable.text = Modle.c_time;
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
